home *** CD-ROM | disk | FTP | other *** search
- import java.awt.Image;
-
- public abstract class BannerTransition {
- protected DynamicBanner owner = null;
- protected int pixelsPerImage = 0;
- protected int imageWidth = 0;
- protected int imageHeight = 0;
- public int numOfFrames;
- public int delay;
- public Image[] frames;
- protected int[] workPixels;
-
- public final void clearFrames() {
- for(int i = 0; i < this.numOfFrames; ++i) {
- this.frames[i].flush();
- }
-
- this.numOfFrames = 0;
- }
-
- public abstract void finishInit();
-
- public void initialize(DynamicBanner parent, int componentWidth, int componentHeight) {
- this.owner = parent;
- this.imageWidth = componentWidth;
- this.imageHeight = componentHeight;
- this.pixelsPerImage = componentWidth * componentHeight;
- this.frames = new Image[this.numOfFrames];
- this.workPixels = new int[this.pixelsPerImage];
- this.delay = 120;
- this.finishInit();
- }
- }
-